package fi.foyt.cs.persistence.domainmodel.scene;

import javax.persistence.Cacheable;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;

import com.google.appengine.api.datastore.Key;


@Entity
@Cacheable
public class SceneCategory {

  public Key getId() {
    return id;
  }
  
  public String getName() {
    return name;
  }
  
  public void setName(String name) {
    this.name = name;
  }
  
  public SceneCategoryType getType() {
    return type;
  }
  
  public void setType(SceneCategoryType type) {
    this.type = type;
  }
  
  public String getExternalId() {
    return externalId;
  }
  
  public void setExternalId(String externalId) {
    this.externalId = externalId;
  }
  
  public Long getParentCategoryId() {
    return parentCategoryId;
  }
  
  public void setParentCategoryId(Long parentCategoryId) {
    this.parentCategoryId = parentCategoryId;
  }

  @Id
  @GeneratedValue(strategy = GenerationType.IDENTITY)
  private Key id;
  
  @Column (nullable = false)
  private String name;
  
  @Column (nullable = false)
  private SceneCategoryType type;
  
  private Long parentCategoryId;
  
  private String externalId;
}
